#ifndef BRICK_H
#define BRICK_H
#include <sstream>

#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>

int const Row = 15, Column = 4, Speed = 200;    //variables for the array (GH Speed was 100)


class Brick
{
private:
    sf::Event   		 Event;
    sf::RenderWindow    MainWindow;   	 //the game window
    enum gamestate{Menu, Game, gameover};
    
    //sprite stuff
    sf::Image   		 Image, Image2, Image3, Image4, Play, Exit, Title2;
    sf::Sprite   		 BallSprite, PaddleSprite, PlaySprite, ExitSprite, Title1, BrickSprite[Row][Column];
    sf::Clock   		 Clock;    //used for creating a constant speed across framerates
	//GH start
	sf::Clock gameTimeClock; //Add gametime clock for application's ui.
	sf::Clock menuClock, collisionClock, paddleClock, ballClock;
	bool splash3run;
	int menuY, playerScore;
	sf::Image image2, image3, image4, image5, image6, image7, image8, image9, image10;
	sf::Sprite splash1, splash2, menubg, newGame, exitGame, ScoreBoard, gameBackground, gameOverBackground, highScoreBackground;
	sf::Font gamefont;
	sf::String timerString, livesString, bannerString, scoreString;
	std::stringstream out;
	char str[3];
	sf::SoundBuffer sound1, sound2, sound3;
	sf::Sound zap1, zap2, bounce;

	enum collisionSwitch{top, bottom, left, right};
	collisionSwitch collision;

	//testing
	int gameTimeDisplay, lives;
	//GH end
    float MoveX, MoveY, Scale_X, Scale_Y, ElapsedTime, FPS; //movement variables for the ball
	int Brick_X, Brick_Y;   	 //a copy of the variables from main
    gamestate   		 state;

public:

    Brick(char* Title,   		 //the constructor
   	 int ScreenWidth,
   	 int ScreenHeight,
   	 int ScreenBpp);

    ~Brick();

    bool Init(int, int, float, float);
    void HandleEvents();
    void Draw();
    void Update();
    void Run();
    
    
    void Collider();
    void ColliderBrick();
};

#endif